import App from '../App'
import home from '../page/home/home'
import city from '../page/city/city'
import msite from '../page/msite/msite'
// const home = r => require.ensure([], () => r(require('../page/home/home')), 'home')
// const city = r => require.ensure([], () => r(require('../page/city/city')), 'city')
// const msite = r => require.ensure([], () => r(require('../page/msite/msite')), 'msite')
import search from '../page/search/search'
import shop from '../page/shop/shop'
import login from '../page/login/login'
import profile from '../page/profile/profile'
import forget from '../page/forget/forget'
import order from '../page/order/order'
import orderDetail from '../page/order/children/orderDetail'
import vipcard from '../page/vipcard/vipcard'
import invoiceRecord from '../page/vipcard/children/invoiceRecord'
import useCart from '../page/vipcard/children/useCart'
import vipDescription from '../page/vipcard/children/vipDescription'
import food from '../page/food/food'
import confirmOrder from '../page/confirmOrder/confirmOrder'
import remark from '../page/confirmOrder/children/remark'
import payment from '../page/confirmOrder/children/payment'
import userValidation from '../page/confirmOrder/children/userValidation'
import invoice from '../page/confirmOrder/children/invoice'
import chooseAddress from '../page/confirmOrder/children/chooseAddress'
import addAddress from '../page/confirmOrder/children/children/addAddress'
import searchAddress from '../page/confirmOrder/children/children/children/searchAddress'
import foodDetail from '../page/shop/children/foodDetail'
import shopDetail from '../page/shop/children/shopDetail'
import shopSafe from '../page/shop/children/children/shopSafe'
import info from '../page/profile/children/info'
import setusername from '../page/profile/children/setusername'
import address from '../page/profile/children/children/address'
import add from '../page/profile/children/children/children/add'
import addDetail from '../page/profile/children/children/children/children/addDetail'
import balance from '../page/balance/balance'
import balanceDetail from '../page/balance/children/detail'
import benefit from '../page/benefit/benefit'
import coupon from '../page/benefit/children/coupon'
import hbDescription from '../page/benefit/children/hbDescription'
import hbHistory from '../page/benefit/children/hbHistory'
import exchange from '../page/benefit/children/exchange'
import commend from '../page/benefit/children/commend'
import points from '../page/points/points'
import pointsDetail from '../page/points/children/detail'
import service from '../page/service/service'
import questionDetail from '../page/service/children/questionDetail'
import find from '../page/find/find'
import download from '../page/download/download'




export default [{
  path: '/',
  component: App, //顶层路由，对应index.html
  children: [ //二级路由。对应App.vue
    //地址为空时跳转home页面
    {
      path: '',
      redirect: '/home'
    },
     //首页城市列表页
     {
      path: '/home',
      component: home
    },
    //当前选择城市页
    {
      path: '/city/:cityid',
      component: city
    },
    //所有商铺列表页
    {
      path: '/msite',
      component: msite,
      meta: {
        keepAlive: true
      }
    },
    //特色商铺列表页
    {
      path: '/food',
      component: food
    },
    //搜索页
    {
      path: '/search/:geohash',
      component: search
    },
    //登录注册页
    {
      path: '/login',
      component: login
    }
  ]
}]
